﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using KPIS.GERP.GHRMS.BLL;

namespace KPIS.GERP.GBMS.APP_UI
{
    public partial class UserPanel : System.Web.UI.UserControl
    {
        private EmployeeBLL empBLL = new EmployeeBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    string seq = new SsMng().GetUss(SsMng.SsUserType.EmpSeq);
                    DataRow dr = empBLL.ListEmployeeBySeq(seq).Rows[0];//.ListEmployeePosByType("1").Rows[0];
                    //lblLv.Text = dr["EmpType"].ToString();
                    lblName.Text = dr["full_name"].ToString();
                    //lblDept.Text = dr["dep_name"].ToString();
                    //lblPosition.Text = dr["emp_position"].ToString();
                }
                catch
                {

                }
            }
        }

        protected void lblName_Click(object sender, EventArgs e)
        {
			/*
            HttpCookie cookie = Request.Cookies["UserDetail"];

            if (cookie != null)
            {
                cookie.Expires = DateTime.Now.AddDays(-1);
            }

            Session.Abandon();
            Response.Redirect(@"~\App_UI\Form\Login.aspx");
			 * */
			new SsMng().LogoutUss();
        }
    }
}